import Vue from 'vue'
import VueRouter from 'vue-router'

//导入组件
import Login from '@/views/Login.vue'
import Register from '@/views/Register.vue'
import Main from '@/views/Main.vue'
import ArtCate from '@/views/Article/ArtCate.vue'
import ArtLst from '@/views/Article/ArtLst.vue'
import Home from '@/views/Home/Home.vue'
import UserAvatar from '@/views/User/UserAvatar.vue'
import Userlnfo from '@/views/User/Userlnfo.vue'
import UserPwd from '@/views/User/UserPwd.vue'


Vue.use(VueRouter)
 //2.路由规则
const routes = [
  //首页重回定向
{path:'/',component:Main},
{path:'/register',component:Register},
{path:'/login',component:Login},
{path:'/artCate',component:ArtCate},
{path:'/artLst',component:ArtLst},
{path:'/home',component:Home},
{path:'/hserAvatar',component:UserAvatar},
{path:'/userlnfo',component:Userlnfo},
{path:'/userPwd',component:UserPwd},



  
]

const router = new VueRouter({
  routes
})

export default router
